Skip to content

Instantly share code, notes, and snippets.

@kyo-takano
kyo-takano / making-the-most-of-local-llms.ipynb
Last active May 21, 2024 10:33
ローカルLLMはこーやって使うの💢
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
/play
/*.png
/*.bmp
/solitaire
@mrshoikot
mrshoikot / s3_lambda_thumbnail_generator.py
Last active May 21, 2024 10:31
S3 thumbnail generator using lambda function
import boto3
import os
import urllib
from PIL import Image
import fitz
s3 = boto3.client('s3')
def lambda_handler(event, context):
# Get the bucket and key from the event
@rylev
rylev / learn.md
Created March 5, 2019 10:50
How to Learn Rust

Learning Rust

The following is a list of resources for learning Rust as well as tips and tricks for learning the language faster.

Warning

Rust is not C or C++ so the way your accustomed to do things in those languages might not work in Rust. The best way to learn Rust is to embrace its best practices and see where that takes you.

The generally recommended path is to start by reading the books, and doing small coding exercises until the rules around borrow checking become intuitive. Once this happens, then you can expand to more real world projects. If you find yourself struggling hard with the borrow checker, seek help. It very well could be that you're trying to solve your problem in a way that goes against how Rust wants you to work.

@lavantien
lavantien / SortingAlgsBenchmarks.c
Created September 30, 2018 08:33
A Benchmarking Program for various Sorting Algorithms writen in C.
// Sorting Algorithms Benchmarks v0.0
// Created by LaVanTien
// 02/01/2016 6:00 AM
// Compiled at C language - ISO C11
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <time.h>
#define TEMPSIZE 10000

E DAJE

Ci hai creduto davvero???? Ma io che ne so'!!!

Se lo sapevo lo dicevo a te???

Se hai cliccato lascia un TUO commento nel muro della vergogna

@denisgolius
denisgolius / generate-ssh-key.sh
Created October 4, 2018 06:55 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/mozilla_rsa
@aliesbelik
aliesbelik / benchmarking-tools.md
Last active May 21, 2024 10:25
Benchmarking & load testing tools
@juxuanu
juxuanu / pacman-cdn-repos.md
Created January 18, 2024 19:28
Global CDNs for ArchLinux repositories

/etc/pacman.d/mirrorlist:

Server = https://cloudflaremirrors.com/archlinux/$repo/os/$arch
Server = https://mirrors.gandi.net/archlinux/$repo/os/$arch
Server = https://mirror.rackspace.com/archlinux/$repo/os/$arch 
Server = https://mirror.facebook.net/archlinux/$repo/os/$arch

No need for Reflector 😉

@ciiqr
ciiqr / zod-optional-null.ts
Last active May 21, 2024 10:19
zod optional/nullable/nullish differences
// zod schema
z.object({
// valid if string or:
optional: z.string().optional(), // field not provided, or explicitly `undefined`
nullable: z.string().nullable(), // field explicitly `null`
nullish: z.string().nullish(), // field not provided, explicitly `null`, or explicitly `undefined`
});
// type
{